RSM integrated GWO, Driving Training, and Election-Based Algorithms for optimising ethylic biodiesel from ternary oil of neem, animal fat, and jatropha

The worldwide exploration of the ethanolysis protocol (EP) has decreased despite the multifaceted benefits of ethanol, such as lower toxicity, higher oxygen content, higher renewability, and fewer emission tail compared to methanol, and the enhanced fuel properties with improved engine characteristics of multiple-oily feedstocks (MOFs) compared to single-oily feedstocks. The study first proposed a strategy for the optimisation of ethylic biodiesel synthesis from MOFs: neem, animal fat, and jatropha oil (NFJO) on a batch reactor. The project's goals were to ensure environmental benignity and encourage the use of totally biobased products. This was made possible by the introduction of novel population based algorithms such as Driving Training-Based Optimization (DTBO) and Election-Based Optimization (EBOA), which were compared with the widely used Grey Wolf Optimizer (GWO) combined with Response Surface Methodology (RSM). The yield of NFJO ethyl ester (NFJOEE) was predicted using the RSM technique, and the ideal transesterification conditions were determined using the DTBO, EBOA, and GWO algorithms. Reaction time showed a strong linear relationship with ethylic biodiesel yield, while ethanol-to-NFJO molar ratio, catalyst dosage, and reaction temperature showed nonlinear effects. Reaction time was the most significant contributor to NFJOEE yield.The important fundamental characteristics of the fuel categories were investigated using the ASTM test procedures. The maximum NFJOEE yield (86.3%) was obtained at an ethanol/NFJO molar ratio of 5.99, KOH content of 0.915 wt.%, ethylic duration of 67.43 min, and reaction temperature of 61.55 °C. EBOA outperforms DTBO and GWO regarding iteration and computation time, converging towards a global fitness value equal to 7 for 4 s, 20 for 5 s and 985 for 34 s. The key fuel properties conformed to the standards outlined by ASTMD6751 and EN 14,214 specifications. The NFJOEE fuel processing cost is 0.9328 USD, and is comparatively lesser than that of conventional diesel. The new postulated population based algorithm models can be a prospective approach for enhancing biodiesel production from numerous MOFs and ensuring a balanced ecosystem and fulfilling enviromental benignity when adopted.


Feedstocks of mixed oils for the production of biodiesel and its transesterification
A technique in which several oily feedstocks are blended together to enhance and complement each individual oil's greatest qualities is referred to as hybrid oils or mixtures of oils.Numerous other physicochemical characteristics, such as kinematic viscosity, acid value, cold flow characteristics, oxidation stability, etc., may also be improved by mixing.In addition to lowering the cost of raw materials, mixing ensures their availability, which lowers manufacturing costs and opens up the possibility of large-scale production.Without the need for additives, the oxidation stability and cold flow properties can be developed by the produced biodiesel made from the blend of oil feedstocks.The idea of blending high-and low-viscosity oils results in a feedstock composition that is appropriate for producing biodiesel with good fuel qualities that are on par with ASTM standards 32,33 .An outstanding technique to produce green diesel is transesterification, which involves combining the catalyst with the oil and methanol 34,35 .Ester conversion is influenced by process variables such as temperature, molar ratio, catalyst amount, and retention time 36 .The catalytic efficiency of potassium hydroxide in biodiesel production yield was improved from 59.8 to 98.7%, subject to optimization 37 .Lowering production costs and increasing biodiesel output can be achieved through the optimisation of the transesterification process 38 .The literature confirms that the transesterification process has the potential to enhance biodiesel production as long as its parameters are optimised.Therefore, studying efficient experimental methodologies and computational machine learning techniques is essential to optimise and improve the efficiency of biodiesel production.

Theory, potential utility and adaptability of EBOA, DTBO, and GWO approaches.
The concept of population-based search algorithms, namely EBOA and DTBO, has been conceived from human activities, while that of metaheuristic algorithms, most importantly GWO, originated from strategies of animals 39 .
EBOA is a population-based metaheuristic algorithm whose members are community individuals.The EBOA was developed to mimic the voting process to select the leader.The fundamental inspiration behind EBOA was the voting process, the selection of the leader, and the impact of public awareness level on the leader's selection.The EBOA population is guided by the search space under the leadership of the elected leader.EBOA's process is mathematically modeled in two phases: exploration and exploitation.The EBOA is a metaheuristic optimization algorithm inspired by the election process in democratic systems.It was proposed by Trojovský et al. 40 .EBOA simulates the election process where candidates (solutions) compete to become the leader (best solution).The fundamental inspiration of EBOA is the voting and election process in which people vote for their preferred candidate to elect the leader of the population.The EBOA steps in two phases: exploration, including the election process, and exploitation, including raising public awareness for better decision-making, are mathematically modelled.
The DTBO is a novel optimisation algorithm inspired by the process of driver training.The underlying concept behind the DTBO design is the process of learning to drive at a driving school and through driving coach training.DTBO is mathematically modeled in three phases: (i) training by the driving instructor, (ii) emulation of students from instructor skills, and (iii) practice.By incorporating this analogy into the optimization process, DTBO achieves a proper balance between exploration and exploitation and offers effective optimization solutions.This approach makes DTBO more proficient at exploring the search space and finding optimal solutions for various optimisation problems compared to other metaheuristic algorithms that rely solely on mathematical models.Moreover, the ability of DTBO to balance global and local search capabilities makes it a robust optimization algorithm with broad applicability.Therefore, DTBO surpasses other metaheuristic algorithms, such as PSO and JAYA, in significantly improving tracking time, reducing fluctuations, and achieving greater power output efficiency.Dehghani et al. 41 proposed DTBO and reported that it mimics the process of adjusting driving parameters to optimize the performance of a vehicle, as seen in the economic dispatch problem 42 .The DTBO design was primarily influenced by how individuals learn to drive in driving schools and through instructortraining programs.The suggested DBOA has several advantages for challenging optimization problems, as well as its expected versatility in handling various types of optimization problems, given that many problems require more flexibility than DTBO can provide.Due to its mathematical foundation, DTBO can be utilised to address a variety of engineering optimisation problems, especially those with high dimensionality 43 .
The GWO algorithm is a new meta-heuristic optimization method inspired by the foraging social behavior of grey wolves.The GWO was first proposed by Mirjalili et al. 44 .The GWO algorithm mimics the leadership hierarchy and hunting mechanism of grey wolves in nature.Four types of grey wolves, namely alpha, beta, delta, and omega, are employed to simulate the leadership hierarchy.
EBOA, DTBO, and GWO models has been explored beyond biodiesel production optimization and into other areas of renewable energy or chemical process optimization.Table 1 highlights the studies related to the aforementioned algorithms.As observed, the potential applicability of the optimization algorithms of EBOA, DTBO, and GWO models have been explored individually or in combination in various engineering applications.Even though the limitations of adopting a single algorithm have been indicated, the hybridization of two or more algorithms has been noted to result in robust and reliable models in areas beyond biodiesel production optimization due to the broader impact and versatility of DTBO, EBOA, and GWO.However, numerous technical applications have examined binary and ternary models, as seen in Tables 2 and 3.As previously mentioned in Table 1, DTBO, EBOA, and GWO were used to model the engine characteristics of composite biodiesel/ nanoparticle blends fuelled IC engines 8 ; GWO was used to model the yield of Nahar oil methyl biodiesel 45 ; ANN-GWO was explored in rice bran oil biodiesel 46 ; GWO, IGOW, and MPR in estimating engine features of www.nature.com/scientificreports/water-in-diesel emulsion-fuel powered IC engine 47 ; RSM, ANN-GWO technique in approximating the yield of tobacco biodiesel 48 ; GOA, WOA, ALO, and GWO in predicting fuel consumption and emission features of IC engines 49 ; GP-GWO technique in viscosity prediction 50 ; RSM-GWO models explored in predicting engine and environmental features of canola oil biodiesel-EHN operated on a diesel engine 51 .GWO employs RSM based on BBD and CCD models derived empirical equations to optimize the biodiesel quality and yield of various feedstocks (refer to Table 1).GWO outperforms the RSM models in enhancing the biodiesel yield derived from canola oil 51 , abundant waste oil 52 , Nahar oil 45 , and animal waste fat-cottonseed-crude rice bran oils 8 .GWO's predicted transesterification conditions resulted in a higher biodiesel yield compared to the grasshopper optimization and firefly algorithms for niger seed oil 53 .The GWO-predicted values agreed adequately with the experimental datasets corresponding to performance and emission characteristics when fueled with biodiesel in diesel engines, compared to the Grasshopper Optimisation Algorithm and the Ant Lion Optimiser 49 .GWO's success in biodiesel research has led it to be an ideal choice for ethylic biodiesel derived from a ternary blend of neem oil, animal fat, and jatropha oil.
As highlighted in Table 3, some of these algorithms include the DTBO algorithm in the piezoelectric nonlinear system 54 ; the DTBO algorithm in the diverse hybrid power system 55 ; the EBOA, DTBO, and GWO models in the engine performance and emission of hybrid biodiesel 56 ; and the DTBO and JAYA in the photovoltaic system 41 .GWO, DTBO and EBOA determined identical optimal parametric conditions for improved engine performance and emission characteristics for BOFs (waste coconut and fish oil) 56 .However, EBOA and DTBO require less computation time than GWO to determine the ideal optimal parametric conditions.The proven efficiencies (computationally efficient and determining global optimal condition) of DTBO, EBOA, and GWO algorithms in distinguished applications have led us to use them for achieving higher conversion of ethylic biodiesel yield from ternary feedstock oils.
Examining the full research studies reveals that the production of ethylic biodiesel from ternary generational feedstock oil (case study of NFJO) has not been investigated and predicted using RSM and three unique population-based stochastic search algorithms (DTBO, EBOA, and GWO).In addition to establishing a correlation between ethylic yield and ethanolysis operating parameters, this needs to be investigated in order to minimise computation time and effort.

Gaps in knowelgde, novelty, motivation and objective of the study
The biodiesel and automobile sectors have used conventional, heuristic, and inefficient stochastic technologies to predict, model, and improve the production of green fuel by identifying the best solutions with minimal computing time and effort.Upon thorough examination of the literature, it can be observed that only methylic biodiesel derived from ternary oil has been studied 8 .The biodiesel stakeholders and experts would be tasked with anticipating, modelling, and scaling up the ethylic route to maximise production, as the methylic route has not demonstrated environmental benefits and failed to acknowledge the renewable nature and full biobased character www.nature.com/scientificreports/ of the ethylene route proposed for this study.The nonlinear relationship between the reaction parameters and responses has made it challenging to predict the influence of factors, even though biodiesel production requires experimentation.In an attempt to close knowledge gaps and expand the body of knowledge in science and engineering coupled with computer-based data analysis, this has led to the adoption of metaheuristic stochastic search algorithms (MSSA), such as GWO, DTBO, and EBOA, respectively.The lack of resilient, reliable, and consistent models has distorted the expected overall environmental benefits of low carbon production from ternary abundant oils.
The following tasks were undertaken to address the gap in relevant research within the existing literature and to improve the previously discussed ethyl yield: (i) central composite rotatable design of RSM was utilised to investigate the simultaneous influence effects of catalyst amount (0.65-1.15 wt.%), reaction temperature (55-65 °C), reaction time (45-75 min), and ethanol to oil molar ratio (5-7) on the yield of produced NFJOEE.(ii) The key and interaction effects among reaction variables impacting the ester conversion were analysed and the optimal conditions for alkaline ethanolysis were determined using the RSM approach.(iii) Optimal response variables described in terms of computation time and iteration by RSM, GWO, DTBO, and EBOA, convergence towards a global fitness.(iv) The NFJOEE fuel characteristics produced under optimal parameters were analyzed according to biodiesel standards.(v) Cost analysis of lab-scale NFJOEE production was determined for biodiesel.(vi) Develop correlations for the densities and viscosity of NFJOEE + Automotive gas oil/diesel fuel blends.

Reagent, equipment, NFJO analysis and its ethylic production
For the purpose of producing ethylic biodiesel from NFJO with ethanol as the alcohol and KOH as the catalyst, jatropha, neem oils, and animal fat were obtained from a local slaughterhouse and an indigeous laboratory in Nigeria.The investigation employed high-purity analytical grade chemicals and reagents, as shown in Table 4, which were purchased from a local vendor in Edo State, Nigeria.Table 5 contains a list of all the primary equipment used in this study.
The ASTM standard was used to assess NFJO's basic properties such as density, viscosity, acidity, and saponification value, with Table 5 summarising the equipment and methods applied.
Figure 1 depicts the schematic of the methodology for pre-and post ethylic biodiesel production and analysis using RSM, GWO, DTBO, and EBOA technique.As oberved, the procedure entails: (i) Pre-treatment of high FFA NFJO and physicochemical properties, (ii) Ethylic biodiesel production from pre-treated NFJO via experimentation and DoE, (iii) Computational modelling approach with multiple inputs/responses, (iv) Analysis of AF-NO-JO ethylic biodiesel, (v) Fuel characterisation and GC-MS based analysis of NFJOEE at the optimal condition.

Pre-treatment of high FFA NFJO and phyicochemical properties
Neem oil, animal fat, and Jatropha oil (NO, AF, and JO) were blended to produce NFJO in the precise proportion of 30:30:40, as previously described by 66,67 .30 g of NO, 30 g of AF, and 40 g of JO were weighed into a 250 ml beaker and mixed with a magnetic stirrer (refer to Fig. 1a, b).After that, 40 g of recently extracted AF and a magnetic stirrer with a constant temperature setting of 70 °C were added to the mixture.Stirring was done to ensure a consistent homogeneous mixture of the novel ternary oil, which is NFJO.In a 1.0-L flask with a flat bottom, 500 g of NO, JO, and AF blend were weighed and combined with 25 g of methanol.Then, a catalyst of 1 wt.% of sulfuric acid (H 2 SO 4 ) was added.The mixture was placed on a magnetic stirrer configured to constantly heat the mixture to 60 °C for an hour while agitating it at 1500 rpm.The %FFA was reduced to less than 1% by repeating the process as shown in Fig. 2 (a-c).The physicochemical properties of the NFJO were determined.

Ethylic biodiesel of pre-treated NFJO via experiment and DoE
Central composite rotatable design (CCRD) was planned for experimentation to analyse the influencing variables such as reaction time, reaction temperature, catalyst dosage and ethanol-to-oil molar ratio on conversion of ethylic biodiesel (refer to Fig. 1c,d).Figure 3 depicts the process specifications for producing ethylic biodiesel from pre-treated NFJO.Pretreated NFJO underwent base ethanolysis, as previously described by 68,69 .In the presence of heat, mixing potassium hydroxide and ethanol resulted in the formation of a potassium ethoxide solution.Potassium ethoxide was added to hot esterified NFJO in a lab-scale reactor.The NFJOEE was allowed to settle after the transesterification operation was completed.Equation (1) was employed to determine the yield of NFJOEE for the respective runs.

Theory of computational approach of models and multiple inputs/response
This section entails the theory with the mathematical context of empirical method and population-based MSSA including the RSM, DTBO, EBOA, and GWO techniques.However, three MSSA techniques namely GWO, DTBO, and EBOA were applied to determine the maximum ethylic biodiesel yield from a set of transesterification conditions.The use of a population of solutions, iterative search for optimal or nearly optimal solutions, and a balance between exploration (exploring new areas within the solution space) and exploitation (updating known good solutions) during the optimization task are common characteristics among the algorithms selected 56,70 .After its development in 2014, the GWO algorithm has been used to address a variety of issues 8,48,52,71 .However, since the DTBO and EBOA were developed in 2022, there is little evidence of their application in the literature for problem-solving 56 .

Modelling by RSM
The four factors influencing the yield of ethylic biodiesel were examined using transesterification studies.Four criteria led to the selection of the CCRD experimental plan for investigation and analysis.Table 6 presents the specifics of the factors and the operating levels for the experiments.30 experiments (16 factorial, 8 axial, and 6 center) were analyzed, out of which 6 center point experiments were created for four factors by utilizing Eq. ( 2) 72 .
The axis of each individual factor at a distance of ± α (α = 2 design variables/4 = 2 for design variables = 4) serves as the basis for the axial point experiments.The independent variables were coded at five levels between − 2 and 2, and these coded levels and control variables were chosen for each component analysis 73 .
Input-output data collected from experiments were analyzed for parametric significance using ANOVA tests to derive empirical equation useful for prediction and optimization (refer to Fig. 1 d-e).Metaheuristic algorithms were applied to the derived regression equation to search for the maximum ethylic biodiesel yield subject to input variable constraints (refer to Fig. 1f).

Modelling by DTBO
Ni et al. 54 described DTBO as a unique MSSA technique that emulates the driving training paradigm, involving learning and adaptation.The driving school is where the training paradigm begins, as a student driver chooses from a variety of instructors who subsequently offer advice and direction 55 .The trainee driver's goal is to become proficient in driving by using the instructor's method together with additional practice on their own.Investigators have a great chance to solve challenging cases with the help of the aforementioned framework.Three stages-exploration, exploitation, and optimisation-are represented mathematically in DTBO and are updated iteratively to produce optimal results 41 .
Phase 1: Training by driving instructor (Exploration) This phase focuses on global search and exploration within the solution space.The DTBO update process involves learner drivers selecting the best-performing members as driving instructors from the DTBO population.Driving instructors guide other members (or learners) by imparting training and facilitating skill acquisition during the learning process.This approach ensures that population members explore distinct areas within the search space effectively resulting in better exploration capability and deriving global solutions 61 .The mathematical modelling of the first phase involves updating the member position according to Eq. (3).Phase 2: Modelling learner behaviour after driving instructor techniques (Exploration) In the second phase, the learner driver imitates the skills, patterns, and driving techniques of the instructor.This process allows DTBO members to transition and shift to various positions in the search space, thereby enhancing the algorithm's exploration capabilities 41 .To mathematically simulate the said phenomenon, the updating of new positions is done using Eqs.(4-6).
( 2) Axial points  In this phase, each learner driver aims to strengthen and refine their driving skills.This involves each driver learner focusing on personal practice to attain their personal best skill level, emphasising exploitation.They conduct a local search near their current position to determine the most advantageous location, showcasing the algorithm's ability to find the best solutions.This phase includes generating a set of random positions close to each member, enhancing the solutions corresponding to the objective function value demonstrating their effectiveness in local search and exploitation 41 .Mathematically the positions are updated using Eq.(7).
Modelling by EBOA EBOA is a novel MSSA technique that mimics the human electoral process.In the electoral process, community members select a leader through a voting phenomenon, where the elected leader impacts all members of society, including those who did not vote for them.The selection of the right candidates relies on the awareness level of community members.A more knowledgeable electorate (voters) tends to make better choices in candidate selection.In EBOA, the awareness of the electoral members or candidates increases the likelihood of selecting the most suitable leader.This concept of the election-voting process is mathematically modelled for solving complex problems, involving two phases (exploration and exploitation).
Phase 1: Voting process and holding elections (exploration) Members of EBOA, drawing on their awareness and expertise in the electoral process, participate in voting for a candidate.This awareness is crucial for selecting quality leaders which are influenced by the value and quality of the objective function, a determinant in their choice.Individuals with more awareness contribute to improved objective function values (OFV) 40 .The mathematical representation of this process, including how it reflects the community's individual choices, is detailed in Eq. (8).
The term OFV i represents the objective function value of the i th member.The OFV best and OFV worst represent the best and worst values of the problem domain.For a maximisation problem, the maximum value of OFV is considered the best and the minimum value of OFV is considered the worst, and vice versa.
In an election process, a minimum of two registered candidates (N C ≥ 2) representing the top 10% of the most aware individuals in the community.These candidates are selected based on their individual awareness levels, with voters choosing the best candidate (C 1 ) whose individual awareness level exceeds or is greater than of a random number.Conversely, less aware individuals are more likely to vote for other candidates.The mathematical formulation of the complete voting process (candidate selection and voting behaviour) is presented in Eq. ( 9).
After the EBOA voting process, the leader is selected based on the highest number of votes he/she received.This elected leader influences all community members, regardless of their vote, by guiding and inspiring the updating of their positions within EBOA.The crucial role played by the leader enhances the global search exploration capability by moving the population to distinguished search locations in the EBOA process.The process initiates with generating a random position for each member supervised by the leader.If new position determined improves the OFV, then the position is updated; otherwise, the previous best positions of members are retained for subsequent iterations.The update process in the EBOA is modelled using Eq.(10a,b). (5) New position of i th candidate solution of Phase 2 Pr evious position of i th candidate solution of Phase 2 Objective function value of previous position of Phase 2 x P 2,i , Else (7) X P 3 ,i New position of i th candidate solution of Phase 3 www.nature.com/scientificreports/Phase 2: Exploitation process by raising awareness among the public movement In the election-voting process the awareness of society plays a vital role in making informed decisions.Individual thoughts activities and leaders contribute to increasing awareness.Mathematically the exploitation or local search produce a better solution in the EBOA process.Evaluating the objective function at a random position near each member in the search space accomplishes this task.If the new position gains a better OFV, update the members position.A better OFV signifies a successful local search and enhances individual awareness, aiding better decisions in subsequent iterations.This process of local search and its impact on awareness and decision-making is a leader-led initiative, where educating the public and raising their consciousness about various ideas and behaviors are key to determining better solutions to problems 40 .Mathematically the above task (raising public awareness) is represented using Eqs.(11, 12).

GWO modelling
GWO was developed to simulate the social hierarchy and hunting behaviour of grey wolves, encompassing both their prey search process and attacking strategy 44,74 .The algorithm is designed to determine the global solution for a problem by imitating the way wolves hunt in a pack (alpha α, beta β, delta δ, and omega ω) 75 .The hunting mechanism in GWO involves wolves encircling their prey guided by α: the leader of the pack represents the current best solution, β: follows the commands of α wolves representing the second-best solution, and δ: follows α and β wolves producing the third-best solution.The above concept is mathematically modelled mathematically to determine the best solutions as follows: Encircling the prey The α, β, and δ wolves positions act as a guide for ω wolves and update their position, and are mathematically represented using Eq. ( 13) 44,74 .
Coefficient vectors.These vectors (Z and C) play a significant role in simulating the hunting behavior of grey wolves.The Z vector is used for diversifying the search space and controlling the exploration and exploitation phases in GWO.The computation uses a function that linearly decreases from 2 to 0 over successive iterations, facilitating a transition shift from wide-range exploration (searching solutions across wide area) to a more focused exploitation (fine-tuning search at promising areas) of the best solutions.The C vector offers random weight to the prey position (also referred to as the best-known position) that emphasises stochastic behaviour in the search process.This vector is typically computed with random values in each iteration, aiding in the random exploration of the search space and introducing unpredictability, mimicking the random hunting movements.Equations (14a) and (14b) provide the Z and C vectors, which are calculated and updated numerically to reflect the wolves' position during the search 44,74 . (10a) New position of i th EBOA member www.nature.com/scientificreports/Hunting, searching for prey, and convergence.The three best solutions obtained for α, β, and δ wolves were used to guide the optimal search for prey.Wolves randomly search for prey by adjusting their positions around the best solutions determined.The algorithm iteratively adjusts the positions of all wolves towards the best solutions.Over successive iterations the wolves converge to the optimal solution representing the prey 44,74 .

Development of models for diesel blends and NFJOEE
Fuel blends were prepared with specific volume percentages of 10%, 20%, 30%, 40%, and 50%.The density of NFJOEE blends at 30 °C was measured using the Pycnometer (Anton Paar, UK) in accordance with ASTM D1298 test method.The kinematic viscosity was measured using a Viscosometer Batch (Anton Paar, UK) following ASTM D445.The average values for kinematic viscosity and density were reported.The densities and kinematic viscosities of the NFJOEE and diesel blends were correlated with the amount of biodiesel using the respective Eqs.(15a) and (15b).

The compilation of data and determining its ideal conditions
The input-output data from the transesterification experiment, which were gathered using an RSM-based CCRD matrix, were examined to determine how individual factors and two-term factor interactions affected the yield of ethyl ester biodiesel produced.3D surface and main effect plots, as well as ANOVA, were used in this analysis.The production of NFJOEE was found to be mathematically correlated with variables related to transesterification.The RSM model's coefficient of determination is assessed in order to potentially aid in the development of precise predictive models.
The experimental input-output data (ethylic transesterification variables-yield of NFJOEE) that correlate to the CCRD matrix are highlighted in Table 8.Design-Expert software was used to apply multiple regression analysis to the experimental input-output data that had been gathered.Equation (16), which displays the ethylic transesterification parameters (ETP) viz.catalyst dosage, ethanol to oil molar ratio, reaction temperature, and time versus NFJOEE, is a second-order polynomial expression that was developed.

Analysis of factors using plots and main effect plot
The main effect plots in Fig. 4(a-d) illustrate how each ETP and operating level affect the average yield values of NFJOEE.The non-linear impact of catalyst dosage on the yield of NFJOEE is seen in Fig. 4a.The catalyst enables and converts the triglycerides in oil and alcohol into biodiesel and glycerol, a byproduct, by lowering the activation energy required for the reactor and enhancing the reaction rate.Increased catalyst dosage increases NFJOEE's yield up to mid-values of 0.9 wt%, after which it declines.Because there are not enough active sites to fully adsorb reactants, a lower catalyst dosage (0.65 wt%) restricts the rate of reaction.The transesterification process between the reactant molecules (ethanol and triglyceride molecules) is enhanced by increasing the catalyst dosage (up to 0.9 wt%).It lowers the required activation energy for the transesterification reaction to complete its process, converting oil to yield 76 .The yield of the NFJOEE drops below the catalyst dosage's ideal concentration, which is reached when all reactant molecules are accommodated at active sites and the maximal reaction rate is achieved.This is explained by increased viscosity, the creation of a soap-like substance, the saponification of free fatty acids, and the challenge of separating the glycerol from the biodiesel 76,77 .The equilibrium phases reached, where the reactants have enough energy to actively interact with the catalyst and the reaction advances to the maximum rate, are what allow for the largest biodiesel yield, as shown in Fig. 4c 78 .As can be observed in Fig. 4b, the yield of NFJOEE was determined to be relatively constant with a slight increase when the reaction temperature varied between their respective values.By giving reactant molecules more energy to collide and cross the activation energy barrier, reaction temperatures as high as 60 °C can quicken the transesterification or chemical reaction 77 .Jambingam et al. 78 remarked that bubble formation tends to decrease the oil-ethanol interface and saponification formation occurs before complete transesterification.The NFJOEE yield showed a slight decrease at higher reaction temperatures, which was attributed to the vaporisation of ethanol from the reaction medium and reduced the proportion of ethanol to undergo transesterification reaction.
When the reaction reached the mid-values, the yield of NFJOEE increased, and as shown in Fig. 4c, the yield of biodiesel remained stable with a relatively small reduction at the end.A higher percentage of active catalysts are abundantly linked with the reactants as the transesterification reaction moves forward, resulting in the steady creation of biodiesel yield.This happens as a result of the oil's molecular structure requiring more time to perform a transesterification reaction in order to convert more biodiesel 77 .This oil contains higher energy saturated fatty acids.The reaction system reaches an equilibrium state, leading to catalyst deactivation 79,80 .The reasons for catalyst deactivation are as follows : (a) Saturated fatty acids have higher stability, reaching a quick equilibrium state where forward and reverse reactions are equal, leading to catalytic deactivation.(b) Saturated fatty acids might undergo side or reversible reactions that produce water or other compounds, which could deactivate the catalyst through hydrolysis.(c) Leaching occurs with an increase in catalyst dosage, resulting in a loss of catalytic activity and shifting the reaction towards equilibrium as the reaction rate slows.The high stability of saturated fatty acids means the reaction can quickly reach equilibrium, where the rates of the forward and reverse reactions are equal, halting further conversion and causing apparent catalyst deactivation.
The NFJOEE's yield first increases with the ethanol-to-oil molar ratio, as seen in Fig. 4d, since additional ethanol accelerates the transesterification reaction.It should be noted that a higher ethanol to oil ratio facilitates the reaction, resulting in a higher biodiesel conversion by allowing the ethanol or reactant molecules to collide with the oil molecules.
The NFJOEE's yield drops below the midpoints of the ethanol to oil molar ratio for four reasons: (a) adding more ethanol does not change the already-achieved balance in favor of the conversion of ethanol into biodiesel (b) excess ethanol may prevent the separation of glycerol from biodiesel; (c) excess ethanol combined with a strong catalyst may cause saponification and soap formation, which may prevent the separation of biodiesel and glycerol; and (d) too much ethanol may make biodiesel more soluble in ethanol, causing it to stay in the ethanol phase rather than separate and reduce yield.www.nature.com/scientificreports/mass, saponification formation (emulsion and gel development), and solvent vaporization prior to the transesterification reaction's completion 76,77,81 .
As shown in Fig. 5b,a maximum biodiesel production of 83.81% was observed close to the mid-values of interaction terms, i.e., catalyst dosage and reaction time.The justification for the higher biodiesel yield up to the mid-points of catalyst dose and reaction time is that there is more available contact surface at the reactant mixtures with catalyst and more time allowed for the chemical reaction to occur 82,83 .The biodiesel yield decreased at higher catalyst loading and reaction time values because the reaction mixture became more viscous (i.e., the mono-and diglyceride molecules dissolved in the glycerol), making it harder to separate the biodiesel from the reactant mixture, initiate a reversible reaction, and deactivate the catalyst 84 .
The correlation between the ethanol-to-oil ratio and catalyst dosage and the yield of NFJOEE is shown in Fig. 5c.A biodiesel conversion of 71.34% was attained at or close to the middle values of the ethanol-to-oil molar ratio and catalyst dosage.By increasing the active contact surface at reactant mixes and allowing ethanol molecules to collide with oil, the catalysts speed up the ethylic process and enhance the yield of NFJOEE produced.Saponification and soap formation are caused by the solubility of ethanol in biodiesel, which makes it difficult to separate the biodiesel from the ethanol reaction phase mixture [85][86][87] .
As shown in Fig. 5d,a maximum NFJOEE yield of 84.52% was observed close to the mid-values of the interaction effects of reaction time and temperature.This might be justified by giving the transesterification reaction enough time to finish, which allows for the reaction mixture's diffusivity (from triglycerides to diglycerides and monoglycerides) to occur for the conversion of biodiesel with a high yield 88 .Longer exposure of the reaction mixture at higher temperatures causes the production of vapour phase, which lowers yield, as highlighted 89 .
The maximum NFJOEE yield of 82.89% is displayed in Fig. 5e, where the ethanol-to-oil molar ratio and reaction temperature are represented by interaction terms.The optimum higher NFJOEE yield values were noted in relation to each of their associated mid-values.The best possible circumstances were found for equilibrium phases, when the reaction temperature guarantees a faster chemical transesterification reaction (collision between reactant molecules between oil and ethanol) in the presence of ethanol 78,90 .
The maximum NFJOEE yield of 84.11% in Fig. 5f was found to be in proximity to the mid-values of the interaction effects of ethanol-to-oil molar ratio and reaction duration.For a higher conversion rate of biodiesel, ethanol's greater solubility in oil and solvent qualities guarantee that the ethanol completes the transesterification process 90 .

ANOVA for Quadratic model for NFJOEE's yield
Analysis of variance is widely used for experimental data analysis providing detailed insights into process factors (linear: catalyst dosage, reaction temperature, reaction time, and ethanol-to-oil-molar ratio; square: catalyst dosage 2 , reaction temperature 2 , reaction time 2 and ethanol-to-oil-molar ratio 2 ; interaction: catalyst dosage x reaction temperature, catalyst dosage x reaction time, catalyst dosage x ethanol-to-oil-molar ratio, reaction temperature x reaction time, reaction temperature x ethanol-to-oil-molar ratio, reaction time x ethanol-to-oilmolar ratio) significance on outputs.The effect of factors (main, square, and interaction) on the ethylic biodiesel yield was statistically analysed for the preset 95% confidence level.The results of ANOVA for NFJOEE's yield are presented in Table 9.The linear factors (such as catalyst dosage and reaction time) were found to have P-values Table 9. Results of the analysis of variance for ethanol biodiesel.less than 0.05, indicating a significant contribution towards ethylic biodiesel yield.P-values > 0.05 were recorded for reaction temperature and ethanol-to-oil-molar ratio, depicting a negligible contribution to ethylic biodiesel.As illustrated in Fig. 5e, the major effect plot demonstrated a minor variation in NFJOEE's yield with the reaction temperature and ethanol-to-oil molar ratio.Higher F-statistic values for reaction time were recorded, depicting a major contribution towards ethylic biodiesel yield.The P-values of the square term of reaction time were found to be greater than 0.05, depicting a strong linear relationship with ethylic biodiesel yield.The interaction terms (catalyst dosage x reaction time, catalyst dosage x ethanol-to-oil-molar ratio, reaction temperature x ethanol-to-oil-molar ratio) were statistically significant.The resulting surface plots showed major variations in ethylic biodiesel yield (refer to Fig. 5 b, c, and e).Although the ethanol-to-oil molar ratio was found to be insignificant, the interaction with reaction temperature and catalyst dosage was statistically significant at a 95% confidence level.The effects of both the individual factors, i.e., catalyst dosage and reaction time, were significant, and their interaction effects on biodiesel yield were insignificant.Higher sum of squares and F-values were recorded for AC (catalyst dosage x reaction time) followed by BD (reaction temperature x ethanol-to-oil-molar ratio) and AD (catalyst dosage x ethanol-to-oil-molar ratio).The F-value of the model was found to be equal to 20.32, depicting its statistical significance.The model-determined coefficient of determination (R 2 ) is 0.9499, depicting the model as statistically adequate.The model determined that the adjusted R 2 (considering only significant terms: A, C, AC, AD, BD, A 2 , C 2 , D 2 ) value was equal to 0.9032.Excluding insignificant terms from the model results in an imprecise input-output relationship and reduces prediction accuracy.
Optimised conditions for synthesised NFJOEE Table 10 shows the optimum condition for the NFJOEE.As shown, a catalyst dose of 0.915%, a reaction temperature of 81.55 °C, a reaction time of 67.43 min, and a molar ratio of 5.99 between ethanol and NFJOE produced the maximum yield of TSOME (86.3%).With the modified experimental settings, the validation assessment resulted in an experimental yield of 86.4%.A 0.12% average error was identified.Since the error proportions in the forecast were consistent, the validation results indicated that the model was accurate.
Comparison of the optimum conditions of NFJOEE with biodiesel literature.Table 11 lists the yield of NFJOEE under ideal circumstances.Differences in the fatty acid composition of the triglycerides in the oil, different reactor geometries, the type of catalyst, variations in the experimental conditions, and purification and washing during the biodiesel production process can all be considered as potential causes of the observed discrepancies in the yield of biodiesel.Optimum yield of 83.5% was achieved for AFW ethyl ester using A full 3 3  To maximize the yield of NFJOEE under transesterification conditions, three meta-heuristic algorithms were employed.Equation ( 16) describes the optimal search process under various constraints, derived from experimental data.The objective function for the GWO, DTBO, and EBOA algorithms was an empirical equation representing the production of NFJOEE based on transesterification variables.All three algorithms were designed to find the optimal conditions for enhancing the ethylic biodiesel yield during the optimization process.The performance of the algorithms was compared based ton computation time and solution accuracy.The codes for the three algorithms (DTBO, EBOA, and GWO) were implemented using MATLAB software on a computer meeting the specified requirements (Intel Core i3 @ 1.2 GHz CPU and 4 GB RAM).
It is important to note that all three algorithms identified transesterification conditions (A: 0.915 wt.%, B: 61.55 oC, C: 67.43 min, D: 5.99) that maximize the NFJOEE yield at 84.983% (refer to Table 12).Experimental validation confirmed an 86.3% ethylic biodiesel yield under the ideal transesterification conditions.
By setting the population size and maximum number of iterations to 100 and 1000, respectively, the computational efficiency of the algorithms was evaluated.EBOA and DTBO outperformed GWO in terms of computation time for reaching the global fitness value (maximum NFJOEE).Although all three algorithms achieved a maximum fitness value of 84.983, the number of iterations required to converge to the global fitness value differed, with DTBO, EBOA, and GWO needing 20, 7, and 985 iterations, respectively (see Fig. 6a-c and Table 10).Additionally, DTBO and EBOA exhibited faster computation times of 4 s compared to 34 s for GWO.The superior performance of DTBO and EBOA over GWO can be attributed to factors such as the need for tuning algorithm -specific parameters in GWO, enhanced exploration capabilities in EBOA and DTBO, and a better balance between exploration and exploitation process Subjected constraints are: Fatty acid compositions and fuel assessment of NFJOEE obtained Table 13 highlights the fatty acid ethyl ester composition of NFJOEE.As can be seen, aside from the greatest component of capric acid (25.87%), which is followed by oleic acid (21.07%), the remaining components include behenic acid (0.6%) and cerotic acid (0.12%).NFJOEE has a higher degree of unsaturation than saturation, which causes a longer premixed combustion and a higher peak pressure 97 .
The economic viability of synthesized biodiesel must meet global green diesel requirements to be assessed in that way.Certain requirements must be met to ensure the diesel engine's efficacy 52,98 .The characteristics of NFJOEE and other biodiesels are highlighted in Table 14.As can be seen, the kinematic viscosity of NFJOEE (5.72 mm 2 /s) was marginally higher than that of 8 (4.33 mm 2 /s) and 99 (4.48 mm 2 /s), but it was still marginally higher than that of diesel (4.48 mm 2 /s).It also exceeded EN 41,214's (3.5-5.0 mm 2 /s) specifications.When IC is powered by NFJOEE, there is no significant change because of the slight difference between NFJOEE's KV and those reported therein.
The density of NFJOEE (866 kg/m 3 ) was slightly higher than B0 (861.8 kg/m3) but in agreement with that of 8 (880 kg/m 3 ) and 99 (862.9kg/m 3 ), as well as the EN 41,214 (850-900 kg/m 3 ) standard.When injected, the fuel should not have a substantial impact on specific fuel consumption or fuel penetration, as indicated by the slightly higher density of NFJOEE compared to B0 100 .Although NFJOEE's acid value (AV) of 0.35 mg KOH/g was higher than 8 0.12 mg KOH/g, it nevertheless met ASTM D6751 and EN 14,214's (0.50 mg KOH/g) requirements.
Because of the fuel's low acid value, NFJOEE cannot proceed through polymerization 101 .
The changes in kinematic viscosity and density of the NFJOEE-diesel blends are shown in Fig. 7(a-b).For internal combustion engines, density is a very important quantity.High-density biodiesel can offset its lower heating value 102 .Due to this correction, biodiesel and diesel fuel can operate engines with similar performance characteristics 103 .As shown in Fig. 7a 104,105 .Viscosity has been shown to impact injector pump atomization and flow 106 .Given the high R 2 of 0.990, it is determined that the linear equation ( 0.0125x + 4.47087 ) is suitable for modelling the KV of NFJOEE-diesel as a function of biodiesel content, as shown in Fig. 7b.Bukkarapu 105 .demonstrated that the one-dimensional model is appropriate for forecasting the KV of blends of NFJOEE and diesel.Though NFJOEE's acid value (AV) of 0.53 mg KOH/g is slightly higher than Ganesha et al.' 8 value of 0.12 mg KOH/g, it is in line with ASTM D6752 and EN 14,214 specifications (0.5 max).The AV's adherence to the standards suggests that NFJOEE won't tend toward polymerization than Ganesha et al. 's 8 The flash point (FLP) of NFJOEE (153 °C) was higher than B0's (76 °C) and in line with Ganesha et al.'s 8 (157 °C), but it nevertheless satisfied both international standards' safety requirements.Biodiesel with a high FLP is less predisposed to fire vulnerability compared to diesel fuel 107 .
NFJOEE indicated pour point (PP) and cloud point (CP) values of 0 °C and -3 °C, respectively, which are higher than B0's values of − 9 °C and − 15 °C.These high PP and CP values are attributed to the saturated fatty esters' abundance in biodiesel, which may limit its wider use in cold climates 30 .
NFJOEE's heating values (HV) were marginally lower at 41.10 MJ/kg than B0's (43.20 MJ/kg).The fuel's greater oxygenated molecule is a contributing factor to the modest fall in HV value.

Cost analysis
The methods proposed by researchers 108 are used to assess the costs associated with biodiesel conversion from NFJO.The expenses associated with biodiesel production cost from a liter of NFJO include ethanol, KOH, power, process time and overheads (labour, equipment depreciation, maintenance and repair, insurance, and administrative expenses).Figure 8a illustrates a schematic for the mathematical computation of the biodiesel production cost from NFJO, while Fig. 8b shows the cost comparison of the biodiesel production cost component from NFJO.
The NFJOEE production cost associated with the present study help industries assess their practical utility considering all essential details presented in Table 15.The calculated overall production cost per kg of biodiesel is $0.9328.Figure 8a,b show the biodiesel production costs that indicates the cost of feedstock is the primary expense, accounting for 81% of total costs.Costs associated with catalysts and ethanol are secondary, while  processing and overhead represent the smallest shares.The cost of feedstock is the most significant factor in biodiesel production, suggesting that securing affordable and consistent feedstock supplies is crucial for economic viability.

Cost of NFJOEE production
Table 16 depicts the cost of biodiesel production using different feedstocks.The estimated production cost of NFJOEE ($0.9328 per liter) is lower when compared with the prices reported in the literature [109][110][111][112][113][114][115] .The NFJOEE processing costs are comparable to, yet lower than, those of conventional diesel fuel.Furthermore, Fig. 8b depicts the feedstocks alone account for 81% of the overall production cost.Reducing feedstock costs can be a strategic focus for cost management and operational efficiency 116 .Significant cost reduction potential exists in lowering feedstock costs through better price negotiations or finding cheaper alternatives 117 .This could lead to a competitive price advantage in the market.The calculated overall production cost of NFJOEE biodiesel is $0.9328 per kg, which could be further reduced by scaling up production and commercialization.

Conclusion
In this study, sustainable resource management using environmentally friendly ethanol and ethylic biodiesel from ternary (neem, animal fat, and jatropha) oil (NFJO) mixed with a 30:30:40 volume proportion was explored on a lab scale with the help of the Central Composite Rotatable Design (Influence of ethylic variables such as   www.nature.com/scientificreports/ethanol-oil-molar ratio, catalyst dosage, reaction temperature, and time on the yield NFJO ethyl ester/ NFJOEE) coupled with cutting-edge population-based algorithms (PBAs) like DTBO and EBOA with GWO.The cost of NFJOEE was estimated.Models were developed to determine the densities and viscosities of NFJOEE-diesel fuel blends.The following can be deduced from this study in order to obtain a robust study in the near future: (i) technological and logistical approach for scaling up the process from a laboratory to an industrial scale; (ii) performance, emission, combustion, and exergetic indices of NFJOEE-butanol doped with nanoparticles; and (iii) varied ratios of neem oil, animal fat, and jatropha oil for ensuring availability, enhancing biodiesel yield, and quality should be further investigated.The objective conclusions drawn from the present work are: • The yield of NFJOEE is not significantly affected by fluctuations within its operational levels, as indicated by the insignificance of the ethanol-to-NFJO molar ratio and reaction temperature.The yield of NFJOEE increased linearly with the variation in response time.• The CCRD model exhibits a better coefficient of determination equal to 0.9499, indicating the model will be useful if employed for prediction and optimization.The insignificant terms (ethanol-to-oil-molar ratio, reaction temperature, reaction temperature 2 , catalyst dosage x reaction temperature, reaction time x reaction temperature, reaction time x ethanol-to-oil-molar ratio) need not be removed from empirical equations, which not only reduce prediction accuracy but also result in an imprecise input-output relationship.• Three meta-heuristic population-based algorithms that use common features (iteratively searching for opti- mal solutions and balance exploration and exploitation during the search process) were applied to solve the optimization problem.EBOA, DTBO and GWO algorithms locate identical transesterification conditions (catalyst dosage: 0.915 wt.%, reaction temperature: 61.55 °C, reaction time: 67.43 min, ethanol-to-oil molar ratio: 5.99) that could maximize ethylic biodiesel yield analytically to 84.98%.The confirmation experiments yielded 86.3% of ethylic biodiesel yield corresponding to optimal transesterification conditions.Computationally, EBOA (4 s and 7 iterations) outperforms DTBO (5 s and 20 iterations) and GWO (985 iterations and 34 s) in converging solutions to locate global fitness values.GWO requires tuning of algorithm-specific parameters, unlike DTBO and EBOA.Furthermore, during optimal search, DTBO and EBOA showed better balance with exploration and exploitation.The results can be directly deployed for large-scale biodiesel production in industries.• The NFJOEE fuel's characteristics agreed with the ranges of the EN 14,214 and ASTMD6751 requirements.
It was determined that NFJOEE has a commercial value of (0.9328 USD/l).• The density and kinematic viscosity models of the NFJOEE-diesel blends were found to be well-suited to the linear connection with high degree coefficient of determinations.

Fig. 1 .
Fig. 1.Schematic of the methodology in ethylic biodiesel from AF-NO-JO and its ternary robust modelling and optimization: (a) steps in preparation of mixed CHO from AF-NO-JO, (b) biodiesel production and testing fuel properties, (c) selection of experimental design, (d) experimental plan for input-output data collection, (e) statistical analysis of collected data, and (f) optimisation for maximized ethylic biodiesel yield using metaheuristic algorithms.

Fig. 7 .
Fig. 7. Density and viscosity models for NFJOEE: (a) Variation of density with NFJOEE content and (b) Variation of kinematic viscosity with NFJOEE content.

Table 1 .
Concise review of EBOA, DTBO and GWO on engineering applications and allied projects.

Table 3 .
Overview of diverse human-based MSSA in engineering applications.X = Not Applied.

Table 5 .
List of equipment.

Table 6 .
Transesterification factors and levels.

Acid (Common Name) Fatty Acid (IUPAC Name) Concentration (%)
is detected as acceptable for forecasting density of NFJOEE-diesel blends as a function of biodiesel concentration.Bukkarapu and Baroutian et al. established similar correlations in their study

Table 14 .
Fuel properties of NFJOEE.a, b, ternary oil methyl biodiesel; c.NA Not Available, NS not specified.

Table 15 .
Computation of biodiesel production cost.

Table 16 .
Cost comparison of NFJOEE and other feedstock-derived biodiesels.